module.exports = {
  // 图片拼接地址
  IMG_URL: "https://www.wantongkonggu.cn/",
  checkPhone: function (phone) {
    var reg = /^1(3|4|5|6|7|8|9)\d{9}$/;
    return reg.test(phone);
  },
};

export const Debounce = (fn, t) => {
  const delay = t || 500;
  let timer;
  return function () {
    const args = arguments;
    if (timer) {
      clearTimeout(timer);
    }
    timer = setTimeout(() => {
      timer = null;
      fn.apply(this, args);
    }, delay);
  };
};
